<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>域名邮件系统查询</title>
<link href="css/base.css" type="text/css" rel="stylesheet" />
<link href="css/common.css" type="text/css" rel="stylesheet" />
<link href="css/sys.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/http.js"></script>
<script type="text/javascript" src="js/sys.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		setWidth();
		$("#_tbody tr:first").css({
			"background" : "#f1f1f1"
		});
		var height = document.documentElement.clientHeight;
		if (height > 540) {
			$(".footer").css({
				"position" : "fixed"
			});
		} else {
			$(".footer").css({
				"position" : "relative"
			});
			//$(".footer").css({"margin-top":"20px"});
		}
		$(window).resize(function() {
			var height = document.documentElement.clientHeight;
			var theight = $("#_table").height();
			if (height > 540) {
				$(".footer").css({
					"position" : "fixed"
				});
			} else if (height<540||theight>25) {
				$(".footer").css({
					"position" : "relative"
				});
				//$(".footer").css({"margin-top":"20px"});
			}
			setWidth();
		});
	});
	function reload() {
		//var regex = "^((25[0-5])|(2[0-4]/d)|(1/d/d)|([1-9]/d)|/d)(/.((25[0-5])|(2[0-4]/d)|(1/d/d)|([1-9]/d)|/d)){3}$";
		var regex = "(\d+)\.(\d+)\.(\d+)\.(\d+)/g";
		var ip = jtrim(document.getElementById("ip1").value);
		var reg = /^(([01]?[\d]{1,2})|(2[0-4][\d])|(25[0-5]))(\.(([01]?[\d]{1,2})|(2[0-4][\d])|(25[0-5]))){3}$/;
		if (reg.test(ip)) {
			window.open($.trim(document.getElementById("address1").value)+ ip);
			return false;
		} else {
			if($.trim(ip)==""){
				alert("ip地址不能为空");
			}else{
				alert("IP地址格式错误!");
			}
			return false;
		}

	}
	function reloads() {
		//var regex = "^((25[0-5])|(2[0-4]/d)|(1/d/d)|([1-9]/d)|/d)(/.((25[0-5])|(2[0-4]/d)|(1/d/d)|([1-9]/d)|/d)){3}$";
		var regex = "(\d+)\.(\d+)\.(\d+)\.(\d+)/g";
		var ip = jtrim(document.getElementById("ip2").value);
		var reg = /^(([01]?[\d]{1,2})|(2[0-4][\d])|(25[0-5]))(\.(([01]?[\d]{1,2})|(2[0-4][\d])|(25[0-5]))){3}$/;
		if (reg.test(ip)) {
			window.open($.trim(document.getElementById("address2").value)+ ip);
			return false;
		} else {
			if($.trim(ip)==""){
				alert("ip地址不能为空");
			}else{
				alert("IP地址格式错误!");
			}
			return false;
		}

	}
	function bookmarkMe() {
		var markme_msg = "请按 Ctrl-D 收藏本页";
		try {
			window.external.AddFavorite(location.href, document.title);
		} catch (e) {
			alert(markme_msg);
		}
	};
	
	function setWidth(){
		var width=$(".content").width();
		var $page_left_width=$(".page-left").width();
		var percent=((width-$page_left_width)/width)*100;
		$(".page-right").css({"width":percent+"%"});
		$("#domain").css({"width":(width-$page_left_width-20)+"px"});
	}
	
</script>
</head>
<body>
	<div class="header">
		<div class="oh">
			<div class="out">
				<img src="images/coremail.gif" alt="coremail logo" class="fl" />
				<h1 class="fl title">域名邮件系统查询</h1>
				<span style="margin-top: 27px; float: right;">
					<a href="http://mailtech.cn/tx/">切换到退信查询系统</a>&nbsp;|&nbsp;<a href="javascript:bookmarkMe()">收藏本页</a>
			   </span>
			</div>
		</div>
	</div>
	<div class="content" style="min-width: 960px; margin-top: 15px;">
		<div>
			<%
				String uri = request.getRequestURI();
			%>
			<div class="fr page-left">
				<div class="oh rbl">
					<h2 class="rbl">IP地址RBL查询</h2>
					<div>
						<blockquote>请输入邮件服务器IP，可同时查询多个国际RBL黑名单。</blockquote>
						<form onsubmit="return reload();">
							<input type="text" class="ip" id="ip1"/>
							<input type="hidden" value="http://www.mxtoolbox.com/SuperTool.aspx?action=blacklist%3a" id="address1"/>
							<input type="submit" class="submit" value="提交IP地址" />
						</form>

					</div>
				</div>
				<div class="oh rbl">
					<h2 class="rbl">IP反查域名</h2>
					<div>
						<blockquote>请输入服务器IP，可查询某IP上绑定了哪些域名。</blockquote>
						<form onsubmit="return reloads();">
							<input type="text" class="ip" id="ip2"/>
							<input type="hidden" value="http://dns.aizhan.com/?q=" id="address2"/>
							<input type="submit" class="submit" value="提交IP地址" />
						</form>

					</div>
				</div>
				<%-- 
				<div>
					<a href="http://www.barracudacentral.org/lookups/ip-reputation"></a>
					<a href="http://www.spamhaus.org/pbl/index.lasso"></a>
					<a href="http://www.robtex.com/rbl/IP"></a>
					<a href="http://www.spamcop.net"></a>
					<a href="http://www.sorb.org"></a>
					<a href="https://ers.trendmicro.com/">趋势的RBL</a>
					<div>趋势的RBL,已由http://www.mail-abuse.com/lookup.html跳转到https://ers.trendmicro.com/</div>
				</div>
				--%>
				<div class="update">
					<dl>
						<dt class="fwb">域名邮件系统查询更新说明</dt>
						<dd>
							<p>2012.10.10</p>
							<p>添加IP反查域名。</p>
						</dd>
						<dd>
							<p>2012.06.18</p>
							<p>修改查询mx记录多条批量返回查询信息。</p>
						</dd>
							<%-- 
						<dd>
							<p>2012.05.17</p>
							<p>新增邮件系统信息判断。</p>
						</dd>
					
						<dd>
							<p>2012.05.15</p>
							<p>修正提交域名后，再点击按钮出现多动态图片的情况。</p>
						</dd>
						 <dd>
						<p>2012.05.11</p>
						<p>修正查找到mx记录没有查找到邮件系统的异常。</p>
					</dd>
					<dd>
						<p>2012.05.10</p>
						<p>a、&nbsp;修正一符号被拦截的bug</p>
						<p>b、&nbsp;增加按照mx记录匹配邮件系统的功能。</p>
					</dd>
					<dd>
						<p>2012.05.05</p>
						<p>调整csv文件名称。</p>
					</dd>--%>
					</dl>
				</div>
			</div>
			<div class="clear ym page-right">
				<div class="fl">
					<dl>
						<dt>域名邮件系统查询</dt>
						<dd>请在下面输入域名，如：coremail.cn icoremail.cn每输入一个域名以空格或回车区分开。</dd>
						<dd>
							如有问题请发邮件到:<a href="mailto:pyao@mailtech.cn">pyao@mailtech.cn</a>
						</dd>
					</dl>
					<form method="post" class="add" onsubmit="return pro();">
						<ul>
							<li><textarea rows="11"  id="domain" name="domain"
									onkeydown="if(event.ctrlKey&&event.keyCode==13){pro();}"></textarea>
							</li>
							<li><input type="hidden" name="url" value="<%=uri%>" />
							</li>
							<li class="check"><input type="submit" value="查询邮件系统" /> <input
								class="reset" type="reset" value="清空" /></li>
						</ul>
					</form>
				</div>

			</div>
			<span>建议每次查询数量不要超过200条</span>
			<hr />
			<div class="rate dn oh fl">
				<span class="dn mess fr"></span>
				<div class="part"></div>
			</div>
			<span class="dn fl label oh"></span>
			<table id="_table">
				<tbody id="_tbody" class="_tbody">
					<tr id="one" class="one">
						<th class="order"></th>
						<th class="dns">域名</th>
						<th class="mx">mx记录</th>
						<th class="grade">邮件系统信息</th>
						<th class="values">返回值</th>
					</tr>
				</tbody>
			</table>
			<div id="wait"></div>
			<div id="save"></div>
		</div>
	</div>
	<%--  
	<div style="width: 980px; margin: 0 auto; clear: both;">
		<div style="bottom: 0;" class="footer"></div>
	</div>
	 --%>
</body>
</html>
